import Login from './views/Login.vue'
import Register from './views/Register.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Table from './views/nav1/Table.vue'
import Form from './views/nav1/Form.vue'
import user from './views/nav1/user.vue'
import Page5 from './views/nav2/Page5.vue'
import echarts from './views/charts/echarts.vue'
import Department from './views/org/Department.vue'
import Shop from './views/org/Shop.vue'
import Employee from './views/org/Employee.vue'
import User from './views/org/User.vue'
import WxUser from './views/org/WxUser.vue'
import Detail from './views/org/Detail.vue'
import DetailType from './views/org/DetailType.vue'

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/register',
        component: Register,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: '首页',
        iconCls: 'fa fa-address-card',
        leaf: true,//只有一个节点
        children: [
            { path: '/', component: echarts, name: '首页' }
        ]
    }
    ,
    {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/department', component: Department, name: '部门管理' },
            { path: '/shop', component: Shop, name: '店铺管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '用户管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/user', component: User, name: '顾客管理' },
            { path: '/employee', component: Employee, name: '员工管理' },
            { path: '/wxUser', component: WxUser, name: '微信用户管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '数据管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/detailType', component: DetailType, name: '数据字典管理' },
            { path: '/detail', component: Detail, name: '数据字典明细管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '别的管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/page5', component: Page5, name: '页面5' },
            { path: '/main', component: Main, name: '主页', hidden: true },
            { path: '/table', component: Table, name: 'Table' },
            { path: '/form', component: Form, name: 'Form' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: 'Charts',
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/echarts', component: echarts, name: 'echarts' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;